Skip to content

refactor(frontend): consolidate Home card options into a single state object#344

Open
marcalexiei wants to merge 1 commit into
stats-organization:masterfrom
marcalexiei:frontend-options-state
Open

refactor(frontend): consolidate Home card options into a single state object#344
marcalexiei wants to merge 1 commit into
stats-organization:masterfrom
marcalexiei:frontend-options-state

Conversation

@marcalexiei

Copy link
Copy Markdown

HomeScreen held ~16 separate useState hooks for card options and threaded them through 34 props into CustomizeStage.
This consolidates them into a single typed CardOptions state object (new pages/Home/cardOptions.ts), updated via a keyed setter.

Changes

  • CustomizeStage props go from 34 to 5; buildCardUrl takes userId, selectedCard and options.
  • Stage descriptions move into STAGE_LABELS, replacing a positional string array in the JSX.
  • The three GitHub-URL paste handlers in CustomizeStage share one pastedPathTail helper.
  • A failed OAuth authenticate call left the page stuck on the loading spinner;
    the exchange now runs in try/catch/finally and the redirect is parsed with
    URLSearchParams instead of substring matching.

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@marcalexiei is attempting to deploy a commit to the martin-mfg's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant